/* High Tide · La Marea Blanca — la vista de corte (T6, src/train/cutaway.js) */
.tc-root { position: absolute; inset: 0; overflow: hidden; color: #eadfc6; font-family: var(--font-body, "Segoe UI", system-ui, sans-serif);
    background: #0b1220; user-select: none; -webkit-user-select: none; touch-action: none; --z: 22; --h: 118px; }
.tc-root * { box-sizing: border-box; }

/* el cielo y la nieve de fondo */
.tc-sky { position: absolute; inset: 0; background: linear-gradient(#7f97b3 0%, #c6d3df 55%, #eef2f6 72%, #f6f8fa 100%); --px: 0px; transition: background 0.8s; }
.tc-root.is-night .tc-sky { background: linear-gradient(#03060d 0%, #0d1626 52%, #243248 70%, #8e9db0 100%); }
.tc-hills { position: absolute; left: 0; height: 30%; bottom: 25.5%; transform: translateX(var(--px)); opacity: 0.6; fill: #a9b8c8; }
.tc-hills.h2 { bottom: 25.5%; height: 17%; opacity: 0.85; fill: #cdd8e3; transform: translateX(calc(var(--px) * 2)); }
.tc-root.is-night .tc-hills { filter: brightness(0.28) saturate(0.6); }
.tc-snowline { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: linear-gradient(#e9eef3, #fbfcfd); }
.tc-root.is-night .tc-snowline { background: linear-gradient(#59677a, #7d8a9b); }

/* la cabecera */
.tc-top { position: absolute; left: 0; right: 0; top: 0; z-index: 6; display: flex; align-items: center; gap: 14px; padding: 10px 14px;
    background: linear-gradient(rgba(7, 11, 20, 0.92), rgba(7, 11, 20, 0.6)); border-bottom: 1px solid rgba(233, 196, 122, 0.25); }
.tc-title { display: grid; line-height: 1.15; min-width: 0; }
.tc-title b { font-family: var(--font-title, Georgia, serif); font-weight: 500; letter-spacing: 0.08em; color: #ffe2a0; font-size: 1.05rem; }
.tc-meta { font-size: 0.78rem; color: #b9c6d2; white-space: nowrap; }
.tc-modes { display: flex; gap: 4px; margin: 0 auto; flex-wrap: wrap; }
.tc-mode { font: inherit; font-size: 0.86rem; color: #d9cdb2; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(233, 196, 122, 0.3); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.tc-mode:hover { background: rgba(233, 196, 122, 0.14); }
.tc-mode.is-on { background: linear-gradient(#e9c47a, #b8893f); color: #1b1408; border-color: #f3d79a; font-weight: 600; }
.tc-tools { display: flex; gap: 4px; }
.tc-btn { font: inherit; min-width: 34px; height: 32px; color: #eadfc6; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 8px; cursor: pointer; }
.tc-btn:hover { background: rgba(255, 255, 255, 0.14); }
.tc-hint { position: absolute; z-index: 5; top: 58px; left: 50%; transform: translateX(-50%); font-size: 0.82rem; color: #2a2f3a; background: rgba(255, 252, 240, 0.86);
    padding: 5px 14px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
.tc-root.is-night .tc-hint { color: #eadfc6; background: rgba(10, 16, 28, 0.82); }

/* el plano entero del tren, arriba */
.tc-mini { position: absolute; z-index: 5; top: 92px; left: 14px; right: 14px; height: 12px; display: flex; gap: 2px; padding: 2px; border-radius: 6px; background: rgba(7, 11, 20, 0.5); cursor: pointer; }
.tc-mini i { display: block; border-radius: 2px; background: #6d7a8c; }
.tc-mini i.k-locked { background: #39414d; }
.tc-mini i.b-frozen { background: #b9dcff; } .tc-mini i.b-cold { background: #7fa9e0; } .tc-mini i.b-mild { background: #d9c68e; }
.tc-mini i.b-warm { background: #f0a050; } .tc-mini i.b-torrid { background: #ff6a2a; }
.tc-mini i.k-locked.b-frozen, .tc-mini i.k-locked.b-cold { background: #4a5a70; }
.tc-mini-v { position: absolute; top: -2px; bottom: -2px; border: 2px solid #ffe2a0; border-radius: 5px; pointer-events: none; }

/* la tira */
.tc-view { position: absolute; left: 0; right: 0; top: 110px; bottom: 116px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tc-root.mode-heat .tc-view { bottom: 96px; }
.tc-strip { position: relative; height: 100%; }
.tc-rail { position: absolute; left: 0; right: 0; top: calc(50% + var(--h) * 0.5 - var(--h) * 0.05); height: calc(var(--z) * 0.22px + 3px);
    background: linear-gradient(#5b6170, #2b2f38); box-shadow: 0 4px 0 rgba(30, 30, 40, 0.25); }
.tc-blanca { position: absolute; left: 0; top: 0; bottom: 0; z-index: 3; pointer-events: none;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.95) 35%, rgba(240, 246, 252, 0.55) 70%, rgba(240, 246, 252, 0) 100%);
    animation: tc-blanca 6s ease-in-out infinite alternate; }
@keyframes tc-blanca { from { filter: blur(2px); opacity: 0.92; } to { filter: blur(8px); opacity: 1; } }

.tc-car { position: absolute; top: calc(50% - var(--h) * 0.5); height: var(--h); cursor: pointer; transition: transform 2.2s cubic-bezier(.5, 0, .9, .6), opacity 2.2s, filter 2.2s; }
.tc-img { position: absolute; inset: 0; z-index: 0; }
.tc-shot { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.tc-img img.tc-shot { z-index: 1; } .tc-under { z-index: 2; }   /* lo de dentro, dibujado, tapa la cara interior del casco */
.tc-root.is-night .tc-car.is-dark .tc-img { filter: brightness(0.3) saturate(0.55); }
.tc-car.k-locked .tc-img { filter: brightness(0.82) saturate(0.6); }
.tc-root.is-night .tc-car.k-locked .tc-img { filter: brightness(0.22) saturate(0.4); }
.tc-car:hover .tc-img, .tc-car.is-over .tc-img { filter: brightness(1.12); }
.tc-car.is-over { outline: 2px dashed #ffe2a0; outline-offset: 2px; border-radius: 8px; }

/* la temperatura: el color del vagón (las clases b-* son las bandas de T3) */
.tc-tint, .tc-frost { position: absolute; left: var(--ix0, 3%); right: var(--ix1, 3%); top: var(--iy0, 14%); bottom: var(--iy1, 20%); pointer-events: none; border-radius: 3px; }
.b-frozen > .tc-tint { background: rgba(190, 220, 255, 0.4); mix-blend-mode: screen; }
.b-cold > .tc-tint { background: rgba(140, 185, 255, 0.22); mix-blend-mode: screen; }
.b-warm > .tc-tint { background: rgba(255, 160, 70, 0.2); mix-blend-mode: soft-light; }
.b-torrid > .tc-tint { background: rgba(255, 110, 30, 0.32); mix-blend-mode: soft-light; }
.b-warm.is-lit > .tc-tint, .b-torrid.is-lit > .tc-tint { box-shadow: 0 0 calc(var(--z) * 1px) rgba(255, 150, 60, 0.35); }
.b-frozen > .tc-frost { box-shadow: inset 0 0 calc(var(--z) * 0.7px) rgba(255, 255, 255, 0.95), inset 0 0 calc(var(--z) * 1.5px) rgba(210, 232, 255, 0.55); }
.b-cold > .tc-frost { box-shadow: inset 0 0 calc(var(--z) * 0.6px) rgba(230, 242, 255, 0.55); }
.k-locked > .tc-tint, .k-locked > .tc-frost { display: none; }

.tc-label { position: absolute; left: 3%; right: 3%; top: -4px; transform: translateY(-100%); display: flex; align-items: baseline; gap: 6px; font-size: 0.74rem; white-space: nowrap; overflow: hidden; color: #1f2633; }
.tc-root.is-night .tc-label { color: #dbe3ee; }
.tc-label b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.tc-temp { font-variant-numeric: tabular-nums; padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.12); }
.b-frozen .tc-temp { background: #cfe6ff; color: #18324e; } .b-cold .tc-temp { background: #9cc0ef; color: #10243d; }
.b-mild .tc-temp { background: #eadba8; color: #3a2e10; } .b-warm .tc-temp { background: #f3b06a; color: #3a1e05; } .b-torrid .tc-temp { background: #ff7a3a; color: #2a0d00; }
.tc-pipe { color: #9aa3ad; } .tc-pipe.on { color: #ff9d4a; }
.tc-plate { font-family: Georgia, serif; font-weight: 700; min-width: 1.6em; text-align: center; padding: 0 4px; border-radius: 3px; background: #e6d9b8; color: #3a2a10; }
.tc-car.k-locked .tc-label b { color: #6e7888; }

.tc-lock { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-size: calc(var(--z) * 1.1px); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); display: grid; justify-items: center; }
.tc-lock small { font-family: Georgia, serif; font-size: 0.6em; color: #ffd27a; }
.tc-curt { position: absolute; left: var(--ix0, 4%); right: var(--ix1, 4%); top: var(--iy0, 16%); bottom: var(--iy1, 22%); pointer-events: none; border-radius: 3px; opacity: 0.8;
    background: repeating-linear-gradient(90deg, rgba(110, 24, 36, 0.62) 0 6px, rgba(150, 40, 50, 0.5) 6px 12px); }
.tc-steps { position: absolute; right: 4%; bottom: 23%; font-size: 0.72rem; padding: 1px 7px; border-radius: 999px; background: rgba(10, 16, 28, 0.75); color: #ffe2a0; }

/* el pasaje: siluetas */
.tc-pass { position: absolute; inset: 0; pointer-events: none; }
.tc-pass i { position: absolute; bottom: 24%; width: calc(var(--z) * 0.42px); height: calc(var(--z) * 1.15px); margin-left: -2px; border-radius: 40% 40% 12% 12%;
    background: rgba(40, 36, 44, 0.72); transform: translateY(calc(var(--d) * -1px)); }
.tc-pass i::before { content: ""; position: absolute; left: 50%; top: calc(var(--z) * -0.32px); width: calc(var(--z) * 0.3px); height: calc(var(--z) * 0.3px); margin-left: calc(var(--z) * -0.15px); border-radius: 50%; background: inherit; }
.tc-pass span { position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); font-size: 0.68rem; padding: 0 7px; border-radius: 999px; background: rgba(10, 16, 28, 0.6); color: #dbe3ee; white-space: nowrap; }

/* las caras */
.tc-face { position: absolute; z-index: 4; width: calc(var(--fs, 30) * 1px); height: calc(var(--fs, 30) * 1px); margin: calc(var(--fs, 30) * -0.5px) 0 0 calc(var(--fs, 30) * -0.5px);
    border-radius: 50%; display: grid; place-items: center; cursor: grab; touch-action: none;
    background: radial-gradient(circle at 35% 30%, #fff8, transparent 55%), var(--c); border: 2px solid #1b1408; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); color: #1b1408; }
.tc-face span { font-family: Georgia, serif; font-weight: 700; font-size: calc(var(--fs, 30) * 0.5px); }
.tc-face em { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 0.66rem; white-space: nowrap; color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; pointer-events: none; display: none; }
.tc-face:hover em, .tc-root.mode-shifts .tc-face em, .in-tray em { display: block; }
.tc-face.is-hurt { border-color: #c0302a; }
.tc-face.is-hurt::after { content: "✚"; position: absolute; right: -4px; top: -6px; font-size: 0.7rem; color: #ff5a4a; }
.tc-face.is-lifted { opacity: 0.3; }
.tc-face.is-ghost { position: absolute; z-index: 20; pointer-events: none; transform: scale(1.25); --fs: 40; cursor: grabbing; }
.tc-face.is-ghost em { display: block; }
.tc-faces { position: absolute; inset: 0; pointer-events: none; }
.tc-faces .tc-face { --fs: max(20, min(48, calc(var(--z) * 1.25))); }
.tc-faces .tc-face { pointer-events: auto; }
.tc-root.mode-heat .tc-face { cursor: pointer; }

/* los turnos dentro del vagón */
.tc-slots { position: absolute; left: 4%; right: 4%; top: 18%; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.tc-slot { display: grid; justify-items: center; gap: 2px; padding: 3px 8px 6px; border-radius: 8px; background: rgba(255, 246, 222, 0.88); border: 1px solid #b8893f; min-width: 64px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.tc-slot b { font-size: 0.7rem; font-weight: 700; color: #3a2a10; white-space: nowrap; }
.tc-slot > div { display: flex; gap: 4px; }
.tc-slot .tc-face { position: relative; margin: 0; --fs: 28; }
.tc-free { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px dashed #9a7a40; font-size: 0.5rem; font-style: normal; color: #7a5a20; }
.tc-slot.is-over { background: #ffe2a0; }
.tc-slot .tc-face em { display: none !important; }
.tc-root.is-dragging .tc-slot { border-color: #ffe2a0; }

/* los enganches */
.tc-coupling { position: absolute; z-index: 5; top: calc(50% + var(--h) * 0.18); transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; padding: 0;
    font-size: 13px; line-height: 1; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(10, 16, 28, 0.75); color: #ffe2a0; cursor: pointer; }
.tc-coupling:hover { background: #8a1f2c; }
.tc-coupling.is-snap { animation: tc-snap 0.5s ease-out forwards; }
@keyframes tc-snap { 50% { transform: translateX(-50%) scale(1.6); background: #ff5a3a; } to { transform: translateX(-50%) scale(0); opacity: 0; } }
.tc-car.is-leaving { transform: translateX(calc(var(--z) * -38px)); opacity: 0; filter: blur(6px) brightness(1.6); pointer-events: none; }

/* bandeja, palancas */
.tc-tray { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: 104px; display: flex; align-items: center; gap: 16px; padding: 0 18px;
    background: linear-gradient(rgba(7, 11, 20, 0.55), rgba(7, 11, 20, 0.95)); border-top: 1px solid rgba(233, 196, 122, 0.25); }
.tc-tray.is-over { background: linear-gradient(rgba(60, 46, 20, 0.7), rgba(30, 22, 10, 0.95)); }
.tc-tray-t { font-family: var(--font-title, Georgia, serif); font-weight: 500; color: #ffe2a0; letter-spacing: 0.06em; white-space: nowrap; }
.tc-tray-f { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding-bottom: 14px; }
.tc-tray .tc-face { position: relative; margin: 0; --fs: 44; }
.tc-levers { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: 88px; display: flex; align-items: center; gap: 24px; padding: 0 18px; flex-wrap: wrap;
    background: linear-gradient(rgba(7, 11, 20, 0.55), rgba(7, 11, 20, 0.95)); border-top: 1px solid rgba(233, 196, 122, 0.25); }
.tc-levers > b { font-family: var(--font-title, Georgia, serif); font-weight: 500; color: #ffe2a0; }
.tc-levers label { display: grid; grid-template-columns: auto 130px 44px; align-items: center; gap: 8px; font-size: 0.84rem; }
.tc-levers input { accent-color: #e9c47a; }
.tc-levers em { font-style: normal; font-variant-numeric: tabular-nums; color: #ffe2a0; }

/* la ficha */
.tc-pop { position: absolute; z-index: 9; width: 308px; max-height: calc(100% - 140px); overflow: auto; display: none; padding: 12px 14px; border-radius: 12px;
    background: rgba(12, 18, 30, 0.96); border: 1px solid rgba(233, 196, 122, 0.45); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-size: 0.86rem; }
.tc-pop.is-on { display: block; animation: tc-in 0.18s ease-out; }
@keyframes tc-in { from { opacity: 0; transform: translateY(6px); } }
.tc-pop-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tc-pop-h b { font-family: var(--font-title, Georgia, serif); font-weight: 500; color: #ffe2a0; font-size: 1rem; }
.tc-pop-h span { padding: 0 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.tc-pop-h span.b-frozen { background: #cfe6ff; color: #18324e; } .tc-pop-h span.b-cold { background: #9cc0ef; color: #10243d; } .tc-pop-h span.b-mild { background: #eadba8; color: #3a2e10; }
.tc-pop-h span.b-warm { background: #f3b06a; color: #3a1e05; } .tc-pop-h span.b-torrid { background: #ff7a3a; color: #2a0d00; }
.tc-pop-x { margin-left: auto; background: none; border: 0; color: #b9c6d2; font-size: 1rem; cursor: pointer; }
.tc-pop p { margin: 4px 0; line-height: 1.35; }
.tc-band { color: #b9c6d2; font-style: italic; }
.tc-sub { margin-top: 10px !important; color: #ffe2a0; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.tc-quiet { color: #9fb4c8; font-style: italic; }
.tc-warn { color: #ff9a8a; }
.tc-wit { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 3px; }
.tc-wit li { padding-left: 14px; position: relative; }
.tc-wit li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tc-wit b { font-weight: 600; }
.tc-ways { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tc-pbtn { font: inherit; font-size: 0.84rem; display: inline-grid; gap: 1px; margin-top: 6px; padding: 6px 12px; border-radius: 8px; cursor: pointer; text-decoration: none; text-align: left;
    color: #1b1408; background: linear-gradient(#e9c47a, #b8893f); border: 1px solid #f3d79a; }
.tc-pbtn small { font-size: 0.72rem; opacity: 0.8; }
.tc-pbtn:disabled { cursor: default; color: #9aa3ad; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); }
.tc-pbtn.is-on { background: linear-gradient(#ffb06a, #d0602a); }
.tc-pbtn.tc-danger { background: linear-gradient(#e0605a, #8a1f2c); color: #fff; border-color: #ff9a8a; }
.tc-enter { display: block; width: 100%; text-align: center; margin-top: 10px; }

.tc-toast { position: absolute; z-index: 12; left: 50%; bottom: 128px; transform: translate(-50%, 10px); padding: 8px 16px; border-radius: 999px; opacity: 0; pointer-events: none;
    background: rgba(12, 18, 30, 0.95); border: 1px solid rgba(233, 196, 122, 0.45); transition: opacity 0.25s, transform 0.25s; font-size: 0.88rem; }
.tc-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* la postal */
.tc-postcard { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(0, 0, 0, 0.7); }
.tc-pc-in { display: grid; gap: 10px; justify-items: center; padding: 14px; background: #f6f1e4; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); max-width: 92%; }
.tc-pc-in img { max-width: 100%; max-height: 70vh; border: 6px solid #fff; }
.tc-pc-in > div { display: flex; gap: 10px; }

/* la cortina de carga */
.tc-curtain { position: absolute; inset: 0; z-index: 40; display: none; place-items: center; background: radial-gradient(#1b2836, #070b12); transition: opacity 0.5s ease; }
.tc-curtain.is-on { display: grid; }
.tc-curtain.is-gone { opacity: 0; pointer-events: none; }
.tc-c-in { display: grid; gap: 10px; justify-items: center; color: #eadfc6; font-family: var(--font-title, Georgia, serif); }
.tc-c-in b { font-size: 1.35rem; letter-spacing: 0.12em; color: #ffe2a0; font-weight: 500; }
.tc-c-in em { font-style: italic; font-size: 0.9rem; color: #b9c6d2; }
.tc-bar { width: 260px; height: 5px; border-radius: 4px; overflow: hidden; border: 1px solid rgba(233, 196, 122, 0.6); }
.tc-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a8803e, #f0dcb4); transition: width 0.25s ease; }
.tc-c-train { display: flex; gap: 4px; margin-bottom: 6px; }
.tc-c-train i { width: 34px; height: 16px; border-radius: 3px 3px 1px 1px; background: #233150; border-bottom: 3px solid #e6d9b8; animation: tc-cars 1.6s ease-in-out infinite; }
.tc-c-train i:nth-child(1) { width: 44px; background: #1b2540; } .tc-c-train i:nth-child(2) { animation-delay: 0.12s; } .tc-c-train i:nth-child(3) { animation-delay: 0.24s; }
.tc-c-train i:nth-child(4) { animation-delay: 0.36s; } .tc-c-train i:nth-child(5) { animation-delay: 0.48s; }
@keyframes tc-cars { 50% { background: #f0a46a; box-shadow: 0 0 12px #f0a46a88; } }

/* lo tapado se oculta (no solo se para): dentro de un vagón o con la escena de la cola */
.tc-root.is-inside > :not(.tc-inside):not(.tc-curtain), .tc-root.is-covered > :not(.tc-curtain) { visibility: hidden; }
.tc-inside { position: absolute; inset: 0; z-index: 20; display: none; }
.tc-root.is-inside .tc-inside { display: block; }
.tc-in-host { position: absolute; inset: 0; }
.tc-in-ui { position: absolute; z-index: 5; left: 12px; top: 12px; right: 12px; display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; pointer-events: none; }
.tc-in-ui > * { pointer-events: auto; }
.tc-in-cams { display: flex; gap: 4px; flex-wrap: wrap; }
.tc-in-cams .tc-pbtn { margin: 0; padding: 4px 10px; background: rgba(12, 18, 30, 0.85); color: #eadfc6; border-color: rgba(233, 196, 122, 0.4); }
.tc-in-ui > .tc-pbtn { margin: 0; }
.tc-in-note { margin-left: auto; padding: 5px 12px; border-radius: 999px; background: rgba(12, 18, 30, 0.8); font-size: 0.84rem; }
.tc-in-labels { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.tc-in-labels span { position: absolute; left: 0; top: 0; margin: -22px 0 0 -40px; width: 80px; text-align: center; font-size: 0.74rem; color: #fff; text-shadow: 0 1px 3px #000; }
.tc-in-labels span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; background: var(--c); }
.tc-inside .ti-root { position: absolute; inset: 0; overflow: hidden; background: #05080d; }
.tc-inside .ti-canvas, .tc-inside .ti-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tc-inside .ti-curtain { position: absolute; inset: 0; z-index: 3; display: none; place-items: center; background: radial-gradient(#1b2836, #070b12); transition: opacity 0.6s ease; }
.tc-inside .ti-curtain.is-on { display: grid; }
.tc-inside .ti-curtain.is-gone { opacity: 0; }
.tc-inside .ti-c-in { display: grid; gap: 8px; justify-items: center; color: #eadfc6; font-family: var(--font-title, Georgia, serif); }
.tc-inside .ti-c-in b { font-size: 1.3rem; letter-spacing: 0.12em; color: #ffe2a0; font-weight: 500; }
.tc-inside .ti-c-in em { font-style: italic; font-size: 0.9rem; color: #b9c6d2; }
.tc-inside .ti-bar { width: 240px; height: 5px; border-radius: 4px; overflow: hidden; border: 1px solid rgba(233, 196, 122, 0.6); }
.tc-inside .ti-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a8803e, #f0dcb4); transition: width 0.25s ease; }

@media (max-width: 760px) {
    .tc-top { flex-wrap: wrap; gap: 6px; padding: 6px 8px; }
    .tc-modes { order: 3; width: 100%; margin: 0; }
    .tc-hint { top: 96px; white-space: normal; width: 92%; text-align: center; }
    .tc-mini { top: 132px; } .tc-view { top: 150px; }
}

/* ───────────── P5 (PLAN-tren-pulido §4.3): turnos explicados y el cuadro de latón ───────────── */
/* la hoja de turnos, arriba (en vez de la frase de ayuda) */
.tc-roster { display: none; }
.tc-root.mode-shifts.has-kit:not(.no-roster) .tc-hint { display: none; }
.tc-root.mode-shifts.has-kit:not(.no-roster) .tc-roster { position: absolute; z-index: 5; top: 58px; left: 14px; right: 14px; display: flex; gap: 6px; align-items: stretch; justify-content: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tc-roster-t { align-self: center; font: 700 0.7rem/1.1 var(--tu-f-title, Georgia, serif); letter-spacing: 0.14em; text-transform: uppercase; color: #3a2a10; background: linear-gradient(#f3dca0, #d6b268 60%, #a8803e);
    padding: 6px 10px; border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255, 244, 210, 0.6), 0 2px 6px rgba(0, 0, 0, 0.35); white-space: nowrap; }
.tc-r { font: 500 0.78rem/1 var(--tu-f-ui, "Segoe UI", sans-serif); display: flex; align-items: center; gap: 5px; padding: 4px 9px 4px 6px; min-height: 32px; white-space: nowrap; cursor: pointer;
    color: #1d1a14; background: rgba(239, 230, 207, 0.94); border: 1px solid #b8893f; border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform var(--tu-t-fast, 120ms) ease, background var(--tu-t-fast, 120ms) ease; }
.tc-r:hover, .tc-r:focus-visible { transform: translateY(-1px); background: #fff6dc; }
.tc-r:focus-visible { outline: 3px solid var(--tu-focus, #f3dca0); outline-offset: 2px; }
.tc-r-i svg { width: 16px; height: 16px; display: block; stroke: #6e5220; }
.tc-r-n { font-weight: 600; }
.tc-r-f { display: inline-grid; place-items: center; position: relative; width: 20px; height: 20px; border-radius: 50%; font: 700 0.66rem/1 Georgia, serif; font-style: normal;
    background: var(--c); border: 1.5px solid #1b1408; color: #1b1408; }
.tc-r-f u { position: absolute; left: 50%; top: 100%; transform: translate(-50%, -3px); text-decoration: none; font: 700 0.5rem/1 var(--tu-f-ui, sans-serif); color: #a8711c; letter-spacing: -1px; white-space: nowrap; }
.tc-r em { font-style: normal; font-size: 0.68rem; color: #7a6a4a; }
.tc-r.is-on { background: rgba(250, 243, 222, 0.98); }
.tc-r.is-missing { border-color: #b0261c; box-shadow: 0 0 0 1px rgba(176, 38, 28, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3); }
.tc-r-miss { color: #b0261c !important; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; border: 1.5px solid #b0261c; border-radius: 3px; padding: 1px 4px; transform: rotate(-4deg); }
.tc-r.is-over { background: #ffe2a0; transform: translateY(-2px) scale(1.04); }
.tc-root.mode-shifts.has-kit:not(.no-roster) .tc-mini { top: 98px; }
.tc-root.mode-shifts.has-kit:not(.no-roster) .tc-view { top: 116px; }

/* estrellas: lo que se le da bien */
.tc-stars, .tc-best { position: absolute; left: 50%; transform: translateX(-50%); font-style: normal; white-space: nowrap; pointer-events: none;
    font: 700 0.58rem/1 var(--tu-f-ui, sans-serif); color: #ffd36a; text-shadow: 0 1px 2px #000, 0 0 3px #000; letter-spacing: -1px; }
.tc-stars { bottom: -7px; }
.tc-best { top: -12px; font-size: 0.66rem; letter-spacing: 0; }
.tc-slot { position: relative; }
.tc-slot.is-missing { border: 2px solid #b0261c; background: rgba(255, 236, 226, 0.92); }
.tc-miss { position: absolute; right: -8px; top: -10px; font: 800 0.6rem/1 var(--tu-f-ui, sans-serif); font-style: normal; letter-spacing: 0.1em; text-transform: uppercase;
    color: #b0261c; background: #fff4ee; border: 1.5px solid #b0261c; border-radius: 3px; padding: 2px 4px; transform: rotate(8deg); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
/* al arrastrar: cada puesto dice cuánto vale para esa persona */
.tc-root.is-dragging [data-stars]::after { content: attr(data-stars); position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -2px); pointer-events: none;
    font: 700 0.78rem/1 var(--tu-f-ui, sans-serif); color: #ffd36a; text-shadow: 0 1px 2px #000, 0 0 4px #000; white-space: nowrap; }
.tc-root.is-dragging .tc-r[data-stars] { position: relative; }
.tc-root.is-dragging .tc-r[data-stars]::after { bottom: auto; top: 100%; transform: translate(-50%, 2px); }
.tc-root.is-dragging [data-fit="3"] { box-shadow: 0 0 0 2px #ffd36a, 0 0 16px rgba(255, 211, 106, 0.7); }
.tc-root.is-dragging [data-fit="2"] { box-shadow: 0 0 0 2px rgba(255, 211, 106, 0.7); }

/* la bandeja con sus botones */
.tc-root.has-kit .tc-tray { height: 112px; }
.tc-root.has-kit.mode-shifts .tc-view, .tc-root.has-kit.mode-sleep .tc-view, .tc-root.has-kit.mode-day .tc-view { bottom: 124px; }
.tc-acts { margin-left: auto; display: flex; gap: 10px; align-items: center; flex: none; }
.tc-tray-f { min-width: 0; }

/* el cuadro de latón */
.tc-root.has-kit.mode-heat .tc-view { bottom: 196px; }
.tc-levers.tc-brass { height: 188px; gap: 18px; padding: 10px 22px; flex-wrap: nowrap; align-items: center;
    background:
        radial-gradient(circle at 12px 12px, #f3dca0 0 2px, #6e5220 2.6px, transparent 3.4px) 0 0 / 100% 100% no-repeat,
        radial-gradient(circle at calc(100% - 12px) 12px, #f3dca0 0 2px, #6e5220 2.6px, transparent 3.4px) 0 0 / 100% 100% no-repeat,
        linear-gradient(180deg, #2b2116 0%, #1a140d 100%);
    border-top: 3px solid #b8893f; box-shadow: inset 0 1px 0 #f3dca0, inset 0 10px 24px rgba(0, 0, 0, 0.55), 0 -6px 20px rgba(0, 0, 0, 0.45); }
.tc-b-head { flex: 0 1 12rem; min-width: 9rem; display: grid; gap: 6px; }
.tc-b-head .tu-plate { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; margin: 0; white-space: nowrap; }
.tc-b-head .tu-plate small { white-space: normal; line-height: 1.2; }
.tc-b-levers { display: flex; gap: 6px; padding: 4px 12px 2px; border-radius: 12px; background: linear-gradient(#3a2c1a, #251b10); border: 1px solid rgba(214, 178, 104, 0.45);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6); }
.tc-b-levers .tu-lever { width: 5.6rem; }
.tc-b-levers .tu-lever-lbl { font-size: 0.6rem; letter-spacing: 0.06em; display: grid; justify-items: center; gap: 2px; min-height: 2.1em; }
.tc-b-levers .tu-lever-lbl svg { width: 15px; height: 15px; }
.tc-b-gauge { flex: none; }
.tc-b-fore { flex: 1 1 auto; min-width: 15rem; max-width: 24rem; padding: 10px 14px !important; display: grid; gap: 4px; align-content: center; }
.tc-f-t { font: 700 0.68rem/1.1 var(--tu-f-title, Georgia, serif); letter-spacing: 0.16em; text-transform: uppercase; color: var(--tu-brass-hi, #f3dca0); margin-bottom: 2px; }
.tc-f { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--tu-text, #eef2f5); }
.tc-f svg { width: 18px; height: 18px; flex: none; stroke: var(--tu-brass, #d6b268); }
.tc-f b { font-variant-numeric: tabular-nums; color: #fff; }
.tc-f.is-good b { color: var(--tu-ok, #6fd39a); } .tc-f.is-bad b { color: #ff8a7e; } .tc-f.is-bad svg { stroke: #ff8a7e; }
.tc-f.b-frozen span, .tc-f.b-cold span { color: var(--tu-t-cold, #7fbfe8); } .tc-f.b-frozen svg, .tc-f.b-cold svg { stroke: var(--tu-t-cold, #7fbfe8); }
.tc-f.b-warm span, .tc-f.b-torrid span { color: var(--tu-t-warm, #ffb066); }
.tc-f-warn { margin-top: 2px; }
.tc-brass .tc-acts { flex-direction: column; align-items: stretch; }
/* los vagones cambian de color en vivo: un fundido corto */
.tc-root.mode-heat .tc-tint { transition: background var(--tu-t-mid, 220ms) ease; }
.tc-root.mode-heat .tc-temp { transition: background var(--tu-t-mid, 220ms) ease; }
@media (max-width: 1180px) {
    .tc-b-head { display: none; }
    .tc-levers.tc-brass { gap: 12px; padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .tc-r, .tc-root.mode-heat .tc-tint, .tc-root.mode-heat .tc-temp { transition: none; }
}

/* ── el tren en marcha (cutaway.js rideSky): capas que pasan, lo lejano despacio y lo cerca deprisa ── */
.tc-roll { position: absolute; left: 0; bottom: calc(100% - var(--hz, 74.5%)); height: 30%; width: 100%; overflow: visible; pointer-events: none; }
.tc-roll-in { position: absolute; left: 0; top: 0; bottom: 0; display: flex; will-change: transform; }
.tc-roll-in svg { height: 100%; flex: none; display: block; }
.tc-roll.r-far { height: 46%; opacity: 0.42; fill: #93a6bc; transform: translateX(calc(var(--px) * 0.5)); }
.tc-roll.r-mid { height: 36%; opacity: 0.6; fill: #c3d0dc; transform: translateX(var(--px)); }
.tc-roll.r-pines { height: 34%; opacity: 0.8; fill: #7d8fa2; transform: translateX(calc(var(--px) * 2)); }
.tc-roll.r-far .tc-roll-in { animation: tc-roll 170s linear infinite; }
.tc-roll.r-mid .tc-roll-in { animation: tc-roll 58s linear infinite; }
.tc-roll.r-pines .tc-roll-in { animation: tc-roll 19s linear infinite; }
@keyframes tc-roll { to { transform: translateX(-2600px); } }
.tc-root.is-night .tc-roll.r-pines { fill: #2c394a; }
/* la nieve del suelo: ventisqueros y rodadas que pasan deprisa */
.tc-roll.r-ground { bottom: auto; top: 0; height: 100%; width: 100%; overflow: hidden; }
.tc-roll.r-ground .tc-roll-in { width: calc(100% + 420px);
    background: radial-gradient(60px 7px at 30% 18%, rgba(150, 170, 192, 0.35), transparent 70%),
                radial-gradient(120px 10px at 75% 46%, rgba(160, 178, 198, 0.28), transparent 70%),
                radial-gradient(40px 5px at 52% 80%, rgba(140, 160, 184, 0.3), transparent 70%);
    background-size: 420px 100%; animation: tc-ground 0.9s linear infinite; }
@keyframes tc-ground { to { transform: translateX(-420px); } }
/* los postes del telégrafo, con sus hilos, junto a la vía (detrás del tren) */
.tc-roll.r-poles { height: 40%; overflow: hidden; opacity: 0.58; }
.tc-roll.r-poles .tc-roll-in { width: calc(100% + 340px);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='100' preserveAspectRatio='none' viewBox='0 0 340 100'%3E%3Cpath fill='%233d4654' d='M29 6h4v94h-4zM14 12h34v3H14zM18 19h26v2H18z'/%3E%3C/svg%3E") 0 0 / 340px 100% repeat-x;
    animation: tc-poles 0.62s linear infinite; }
.tc-roll.r-poles::before, .tc-roll.r-poles::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: rgba(50, 60, 74, 0.55); }
.tc-roll.r-poles::before { top: 14%; } .tc-roll.r-poles::after { top: 19%; }
@keyframes tc-poles { to { transform: translateX(-340px); } }
.tc-root.is-night .tc-roll.r-poles { opacity: 0.35; }
/* las traviesas corren bajo las ruedas */
.tc-rail { overflow: hidden; }
.tc-sleepers { position: absolute; left: 0; top: 0; bottom: 0; width: calc(100% + 24px); will-change: transform;
    background: repeating-linear-gradient(90deg, rgba(20, 22, 28, 0.55) 0 5px, transparent 5px 12px); animation: tc-sleep 0.06s linear infinite; }
@keyframes tc-sleep { to { transform: translateX(-12px); } }
/* los vagones se mecen, cada uno a su compás; la locomotora echa vapor hacia atrás */
.tc-root.is-running .tc-car { animation: tc-bob 2.3s ease-in-out infinite; animation-delay: var(--bob, 0s); }
@keyframes tc-bob { 0%, 100% { translate: 0 0; } 18% { translate: 0 -1.4px; } 34% { translate: 0 0.4px; } 62% { translate: 0 -0.8px; } }
.tc-steam { position: absolute; right: 16%; top: 4%; width: 0; height: 0; z-index: 2; pointer-events: none; }
.tc-steam i { position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: -13px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(235, 242, 250, 0.4) 55%, transparent 72%);
    opacity: 0; animation: tc-steam 2.6s linear infinite; }
.tc-steam i:nth-child(2) { animation-delay: -0.43s; } .tc-steam i:nth-child(3) { animation-delay: -0.87s; }
.tc-steam i:nth-child(4) { animation-delay: -1.3s; } .tc-steam i:nth-child(5) { animation-delay: -1.73s; } .tc-steam i:nth-child(6) { animation-delay: -2.17s; }
@keyframes tc-steam { 0% { opacity: 0; transform: translate(0, 0) scale(0.4); } 10% { opacity: 0.9; }
    100% { opacity: 0; transform: translate(-230px, -46px) scale(3.2); } }
/* copos que cruzan de lado */
.tc-flakes { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.tc-flakes i { position: absolute; left: 0; top: -200px; width: calc(100% + 300px); height: calc(100% + 400px); will-change: transform;
    background: radial-gradient(1.6px 1.6px at 20px 30px, #fff, transparent), radial-gradient(1.2px 1.2px at 140px 90px, #fff, transparent),
                radial-gradient(2px 2px at 230px 160px, rgba(255, 255, 255, 0.9), transparent), radial-gradient(1.3px 1.3px at 80px 180px, #fff, transparent);
    background-size: 300px 200px; opacity: 0.7; animation: tc-flake 1.1s linear infinite; }
.tc-flakes i + i { background-size: 210px 150px; opacity: 0.45; animation-duration: 1.9s; filter: blur(0.6px); }
@keyframes tc-flake { to { transform: translate(-300px, 200px); } }
.tc-flakes i + i { animation-name: tc-flake2; } @keyframes tc-flake2 { to { transform: translate(-210px, 150px); } }
/* parado en el andén: el paisaje se queda quieto, nada de vapor ni de copos de lado */
.tc-root.is-still .tc-roll-in, .tc-root.is-still .tc-sleepers { animation-play-state: paused; }
.tc-root.is-still .tc-steam, .tc-root.is-still .tc-flakes { display: none; }
.tc-root.is-2d .tc-flakes i + i { display: none; }
@media (prefers-reduced-motion: reduce) {
    .tc-roll-in, .tc-sleepers, .tc-flakes i, .tc-root.is-running .tc-car { animation: none !important; }
}
.tc-root .tc-sky > .tc-snowline { top: var(--hz, 74%); height: auto; bottom: 0; }

/* El paisaje 3D de La Línea detrás del corte (sky3d en cutaway.js, Line.adopt): entra con un fundido
   y retira el paisaje dibujado; la nieve del suelo (tc-snowline) sigue tapando lo de delante de la vía */
.tc-sky3d { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.9s ease; }
.tc-root.has-sky3d .tc-sky3d { opacity: 1; }
.tc-root.has-sky3d .tc-roll.r-far, .tc-root.has-sky3d .tc-roll.r-mid,
.tc-root.has-sky3d .tc-roll.r-pines, .tc-root.has-sky3d .tc-roll.r-poles { opacity: 0; transition: opacity 0.9s ease; }
.tc-root.has-sky3d .tc-sky { background: #c9d3dd; }

/* Cara del retrato dentro del círculo (P2c) */
.tc-face .t-face-img, .tc-r-f .t-face-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; pointer-events: none; }

/* ───────────── U1 (PLAN-pulido-final §3): moverse por el tren ───────────── */
.tc-view { cursor: grab; }
.tc-view.is-panning, .tc-view.is-panning * { cursor: grabbing !important; }
.tc-view .tc-car, .tc-view .tc-face { cursor: pointer; }
.tc-root.mode-heat .tc-view .tc-car { cursor: pointer; }
/* las flechas de latón: siempre a la vista, a media altura de la tira */
.tc-nav { position: absolute; z-index: 7; top: 50%; width: 52px; height: 92px; margin-top: -46px; padding: 0; cursor: pointer; touch-action: none;
    border: 1px solid #f3dca0; border-radius: 26px;
    background: radial-gradient(120% 70% at 35% 22%, rgba(255, 250, 225, 0.85), transparent 45%), linear-gradient(#f3dca0, #d6b268 48%, #a8803e 78%, #7a5a26);
    box-shadow: inset 0 0 0 3px rgba(122, 90, 38, 0.55), inset 0 -6px 10px rgba(60, 38, 10, 0.35), 0 6px 18px rgba(0, 0, 0, 0.45);
    opacity: 0.9; transition: opacity 160ms ease, transform 120ms ease, filter 160ms ease; }
.tc-nav.is-l { left: 10px; } .tc-nav.is-r { right: 10px; }
.tc-nav i { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -6px; border: solid #2e1f0a; border-width: 0 5px 5px 0; border-radius: 2px;
    transform: rotate(-45deg); filter: drop-shadow(0 1px 0 rgba(255, 240, 200, 0.7)); }
.tc-nav.is-l i { margin-left: -11px; transform: rotate(135deg); }
.tc-nav::after { content: ""; position: absolute; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; top: 8px;   /* el remache */
    background: radial-gradient(circle at 35% 35%, #fff3cf, #8a6428); box-shadow: 0 66px 0 0 #9b7433; }
.tc-nav:hover { opacity: 1; filter: brightness(1.08); transform: scale(1.04); }
.tc-nav:focus-visible { outline: 3px solid var(--tu-focus, #f3dca0); outline-offset: 3px; }
.tc-nav.is-down, .tc-nav.is-auto { transform: scale(0.95); filter: brightness(1.15) drop-shadow(0 0 10px rgba(255, 210, 120, 0.8)); opacity: 1; }
.tc-nav.is-end { opacity: 0.28; filter: saturate(0.3); }
.tc-root.is-dragging .tc-nav { pointer-events: none; }
.tc-root.is-covered .tc-nav, .tc-root.is-covered .tc-navhint { display: none; }
@media (max-width: 720px) { .tc-nav { width: 40px; height: 72px; margin-top: -36px; } .tc-nav::after { box-shadow: 0 50px 0 0 #9b7433; } }
/* la barra de vagones: clic = ir; el recuadro dorado se arrastra */
.tc-mini { cursor: pointer; touch-action: none; }
.tc-mini i { transition: filter 120ms ease; }
.tc-mini i:hover { filter: brightness(1.3); }
.tc-mini-v { cursor: grab; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 8px rgba(255, 210, 120, 0.45); }
.tc-mini.is-scrub { cursor: grabbing; }
.tc-mini.is-scrub .tc-mini-v { background: rgba(255, 226, 160, 0.18); }
/* el aviso de la primera vez */
.tc-navhint { position: absolute; z-index: 8; left: 50%; top: auto; bottom: 190px; display: flex; align-items: center; gap: 12px; padding: 10px 18px; pointer-events: none;
    font: 600 0.95rem/1.2 var(--tu-f-ui, "Segoe UI", sans-serif); color: #2a1d08; white-space: nowrap;
    background: linear-gradient(#f8e6b4, #e2c27c); border: 1px solid #a8803e; border-radius: 999px; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
    opacity: 0; transform: translate(-50%, 20%) scale(0.96); transition: opacity 380ms ease, transform 380ms ease; }
.tc-navhint.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.tc-nh-k { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 1.2rem; line-height: 1; color: #f8e6b4; background: #5a4018;
    animation: tc-nh-nudge 1.4s ease-in-out infinite; }
.tc-nh-k:last-child { animation-direction: reverse; }
@keyframes tc-nh-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-4px); } }
@media (max-width: 720px) { .tc-navhint { white-space: normal; width: 86%; font-size: 0.85rem; } }
@media (prefers-reduced-motion: reduce) { .tc-nh-k { animation: none; } }

/* X1 (auditoría): «La tripulación» no cabía y Nico bajaba a una segunda línea cortada: una sola fila, más junta */
.tc-tray-f { flex-wrap: nowrap; gap: clamp(6px, 1.1vw, 22px); }
.tc-tray .tc-face { flex: 0 0 auto; }
@media (max-width: 1400px) { .tc-tray .tc-face { --fs: 38; } .tc-tray { gap: 10px; padding: 0 12px; } }
